#include "alttiledmapplugin.h"

#include "altabstractmapeditor.h"
#include "altmap.h"
#include "alttiledmapeditor.h"
#include "alttiledmap.h"

namespace Alt {
     Map* TiledMapPlugin::createMap(const QString& type) const {
          if(type == "alt tiled map") {
               return new TiledMap();
          }
          return 0;
     }

     AbstractMapEditor* TiledMapPlugin::createMapEditor(const QString& type, const QString& fileName, QWidget* parent) const {
          if (type == "alt tiled map") {
               return new TiledMapEditor(fileName, parent);
          }
          return 0;
     }

     QString TiledMapPlugin::pluginDescription() const {
          return tr("Provides the 'alt tiled map' type, and an appropriate editor.");
     }

     QString TiledMapPlugin::pluginName() const {
          return tr("Default tiled map plugin");
     }

     QStringList TiledMapPlugin::mapTypes() const {
          return QStringList() << "alt tiled map";
     }

     QStringList TiledMapPlugin::supportedMapTypes() const {
          return mapTypes();
     }
}

Q_EXPORT_PLUGIN2(alttiledmap, Alt::TiledMapPlugin);
